package cn.bdqn.third;

/**
 * @Description TODO
 * @Date 2020/2/12 9:35
 * @Created by 张三三
 */
import java.awt.*;

public class ColorInk implements Ink{

    public String getColor(int r, int g, int b) {
        Color color = new Color(r,g,b);
        return "#"+Integer.toHexString(color.getRGB()).substring(2);
    }

    public static void main(String[] args) {
        Color color = new Color(255,245,100);
        System.out.println(color.getRGB());
        System.out.println(Integer.toHexString(color.getRGB()));

    }
}
